package camel.first.api.datastore.dao;

import camel.first.api.datastore.dao.exceptions.IllegalOrphanException;
import camel.first.api.datastore.dao.exceptions.NonexistentEntityException;
import camel.first.api.datastore.dao.exceptions.PreexistingEntityException;
import camel.first.api.datastore.internal.entity.CoverageEntity;

import javax.persistence.EntityManager;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 4/19/11
 * Time: 12:18 AM
 * To change this template use File | Settings | File Templates.
 */
public interface CoverageEntityJpaController {
    EntityManager getEntityManager();

    void create(CoverageEntity coverageEntity) throws IllegalOrphanException, PreexistingEntityException, Exception;

    void edit(CoverageEntity coverageEntity) throws IllegalOrphanException, NonexistentEntityException, Exception;

    void destroy(int id) throws NonexistentEntityException;

    CoverageEntity findCoverageEntity(int id);
}
